package com.zjj.dao;

import com.zjj.pojo.Product;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper {
//    Product findProductById(Integer id);



    @Select("SELECT * FROM tb_product WHERE id in " +
            "(select product_id from tb_ordersitem where order_id = #{id})")
    List<Product> selectProductByOrdersId(int id);

}
